package com.example.shop_2304.room

import android.app.Application
import androidx.room.Room

/**
 * 数据库工具类
 */
class AppDbUtils {
    companion object{
        private lateinit var appDataBase: AppDataBase

        fun init(application: Application){
            appDataBase = Room.databaseBuilder(application,AppDataBase::class.java,"shop_2304.db")
                .allowMainThreadQueries()
                .build()
        }

        fun getDb() = appDataBase
    }
}